import org.jsoup.Jsoup;

import javax.swing.*;
import java.io.IOException;

public class Dict {
    public static void main(String[] args) throws IOException {
        //String w = "java";
        String w = JOptionPane.showInputDialog("请输入词汇：");
        String u = "https://cn.bing.com/dict/search?q=" + w;
        String t = Jsoup.connect(u).get().select("span[class=def b_regtxt]").get(0).text();
        //System.out.println(t);
        JOptionPane.showMessageDialog(null, t);
    }
}
